
<div ng-controller="CotyReportCtrl">
	
<div ng-include="'/templates/paramsSelect.html'"></div>
	<div class="page-heading">
		<ul class="breadcrumb">
			<li><a href="javascript:;">报表管理</a></li>
			<li >车辆分析</li>
			<li class="active" ng-hide="menuName">库龄车库龄统计</li>
			<li class="active" ng-show="menuName" ng-bind="menuName"></li>
			<span style="margin-right:10px;"  class="btn btn-danger btn-xs pull-right btn-flag " ng-show="flag" ng-click="delFlag('/coty/cotyreport/')"><i class="fa fa-times"></i> 删除 </span>
			<span style="margin-right:10px;"  class="btn btn-info btn-xs pull-right btn-flag " ng-click="addFlag('#/coty/cotyreport/')"><i class="fa fa-star"></i> 收藏 </span>
		</ul>
	</div>
	<!-- 页面头部  end-->

	<!--页面内容显示区域-->
	<div class="wrapper">


		<div class="row">
			<div class="col-sm-12">
				<!--表格显示区域-->
				<section class="panel">
					<!--区块头 显示表格名称和功能按钮-->
					<header class="panel-heading">
						库龄车库龄统计信息

						<!--控制按钮-->
						<span class="tools pull-right"> <!--收起-->
							<button type="button" class="btn btn-success pull-left" ng-click="SearchData()"
								style="margin-left: 5px;">
								<i class="fa fa-search"></i> 查询
							</button>
							<button type="button" class="btn btn-info  pull-left" ng-click="ExportData()"
								style="margin-left: 5px;">
								<i class="fa fa-table"></i> 导出EXCEL
							</button> <a href="javascript:;" class="fa fa-chevron-up form_display"></a>

						</span>
					</header>
					<!--区块body 显示表格内容-->
					<div class="panel-body form-horizontal form_hide">
						<div class="row">
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">事业部</label>
										<div class="col-lg-8 col-sm-7">
										<input type="text" id="entity_group_name"  ng-keyup="clearGroup()" name="entity_group_name"   class="form-control select_edit form_params" />
                                            <ul class="select_list">
                                                  <li ng-repeat="e in groups" ng-click='LoadBrandsCoty(e.group_name)' val_code="{{e.group_name}}" val_name="{{e.group_name}}">{{e.group_name}}</li>
                                            </ul>  
                                        </div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">店面品牌</label>
									<div class="col-lg-8 col-sm-7">
										<input type="text" id="entity_brand_name"  ng-keyup="clearGroupBrand()" name="entity_brand_name" class="form-control select_edit form_params" value=""/>
                                            <ul class="select_list">
                                                  <li ng-repeat="e in gBrands" ng-click='LoadEntitys(e)' val_code="{{e.brand_code}}" val_name="{{e.brand_name}}">{{e.brand_name}}</li>
                                            </ul> 
									</div>
								</div>
							</div>
							
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label" for="inputEmail1">店面信息</label>
									<div class="col-lg-8 col-sm-7">
											<input type="text" id="entity_name" ng-keyup="clearGroupBrandEntity()" name="entity_name" class="form-control select_edit form_params" value=""/>
                                            <ul class="select_list">
                                                  <li ng-repeat="e in entitys" ng-click='LoadEntityBrands(e)' val_code="{{e.entity_code}}" val_name="{{e.entity_name}}">{{e.entity_name}}({{e.entity_code}})</li>
                                            </ul>  
									</div>
								</div>
							</div>
							
							
						    <!-- 库龄值 -->
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">库龄大于</label>
									<div class="col-lg-8 col-sm-7">
										<input name="reservoirageMin" class="form-control form_params" />
									</div>
								</div>
							</div>
							
							<!-- 库龄值-->
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">库龄小于</label>
									<div class="col-lg-8 col-sm-7">
										<input name="reservoirageMax" class="form-control form_params" />
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">车辆品牌</label>
									<div class="col-lg-8 col-sm-7">
									 
										<select name="brandcode"  ng-model="ch_brand" ng-change="LoadSeries(ch_brand)"  class="form-control form_params">
											<option></option>
											<option ng-selected="b.brand_code==selected.brand_code" ng-repeat="b in brands"  value="{{b.brand_code}}">{{b.brand_name}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">车系</label>
									<div class="col-lg-8 col-sm-7">
										<select name="seriescode" id="seriesname" ng-model="$root.ch_serie" ng-change="LoadModels(ch_serie);"    class="form-control form_params">
											<option></option>
											<option ng-selected="b.series_name==selected.series_name" ng-repeat="b in $parent.series"   value="{{b.series_code}}">{{b.series_name}}</option>
										</select>
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">车型</label>
									<div class="col-lg-8 col-sm-7">
										<select name="modelname" id="modelname" class="form-control form_params">
											<option></option>
											<option  ng-repeat="b in $parent.models" value="{{b.model_name}}">{{b.model_name}}</option>
										</select>
									</div>
								</div>
							</div>

													
						</div>
					</div>
				</section>

				<section class="panel">
					<!--区块头 显示表格名称和功能按钮-->
					<header class="panel-heading">
						库龄车库龄信息列表
						<headshow></headshow>
						<div class="option_check_list" style="display: inline-block;"></div>
					
						<!--控制按钮-->
						<span class="tools pull-right"> <!--收起--> <a
							href="javascript:;" class="fa fa-chevron-down"></a>
						</span>
						<div class="pull-right"
							style="margin-right: 10px; margin-top: -6px; display: inline-block">
							<button type="button" class="btn btn-danger btn-sm " href="#paramsSelect"
								data-toggle="modal">
								<i class="fa fa-plus"></i> 在结果集中筛选
							</button>
							<button type="button" class="btn btn-success btn-sm"
								id="search_table" ng-click="SearchData();">
								<i class="fa fa-search"></i> 查询表格
							</button>
						</div>
					</header>
					<!--区块body 显示表格内容-->
					<div class="panel-body form-horizontal ">

						<div class="adv-table" style="overflow-x: scroll">
							<table id="cotyTable"
								class="table table-striped  nowrap  dataTable no-footer table_store table-hover float_head"
								cellspacing="0" width="100%">
								<thead>
									<tr>
										<th ng-show="!cols.contains('index_id')" column="index_id">序号</th>
										<th ng-show="!cols.contains('entity_code')" column="entity_code">店面编号</th>
										<th ng-show="!cols.contains('entity_name')" column="entity_name">店面名称</th>
										<th ng-show="!cols.contains('entity_brand_name')" column="entity_brand_name">店面品牌</th>
										<th ng-show="!cols.contains('entity_group_name')" column="entity_group_name">事业部</th>
										<th ng-show="!cols.contains('vin')" column="vin">VIN</th>
										<th qtype='long' ng-show="!cols.contains('reservoirAge')" column="reservoirage">库龄</th>
										<th qtype='float' ng-show="!cols.contains('plm_1')" column="plm_1">销售经理扣款</th>
										<th qtype='float' ng-show="!cols.contains('plm_2')" column="plm_2">总经理扣款</th>
										<th qtype='float' ng-show="!cols.contains('plm_3')" column="plm_3">销售部长扣款</th>
										<th qtype='float' ng-show="!cols.contains('plm_4')" column="plm_4">事业部总经理扣款</th>
										<th ng-show="!cols.contains('storagename')" column="storagename">仓库</th>
										<th ng-show="!cols.contains('storagepositionname')" column="storagepositionname">库位</th>
										<th qtype='float' ng-show="!cols.contains('purchaseprice')" column="purchaseprice">采购金额</th>
										<th ng-show="!cols.contains('seriesname')" column="seriesname">车系</th>
										<th ng-show="!cols.contains('modelname')" column="modelname">车型</th>
										<th ng-show="!cols.contains('configname')" column="configname">配置</th>
										<th ng-show="!cols.contains('colorname')" column="colorname">颜色</th>
										<th ng-show="!cols.contains('productcode')" column="productcode">产品代码</th>
										<th ng-show="!cols.contains('productname')"  column="productname">产品名称</th>
										<th qtype="bool" ng-show="!cols.contains('fake_flag')" column="fake_flag">是否虚销车</th>
										<th qtype="bool" ng-show="!cols.contains('is_test_drive_car')" column="is_test_drive_car">是否试乘试驾车</th>
										<th ng-show="!cols.contains('source_code')" column="source_code">资金来源</th>
										<th ng-show="!cols.contains('stockstatus')" column="stockstatus">在库状态</th>
										<th ng-show="!cols.contains('marstatus')" column="marstatus">车辆状态</th>
										<th qtype='date' ng-show="!cols.contains('firststockindate')" column="firststockindate">入库日期</th>
										<th qtype='float' ng-show="!cols.contains('interestholiday')" column="interestholiday">免息期</th>
										<th qtype='float' ng-show="!cols.contains('surplus')" column="surplus">剩余免息天数</th>
									</tr>
								</thead>
								<tbody>
									<tr ng-repeat="c in cotyReports">
										<td  ng-show="!cols.contains('index_id')" class="">{{$index + 1 }}</td>
										<td ng-show="!cols.contains('entity_code')" column="entity_code">{{c.entity_code}}</td>
										<td ng-show="!cols.contains('entity_name')" column="entity_name">{{c.entity_name}}</td>
										<td ng-show="!cols.contains('entity_brand_name')" column="entity_brand_name">{{c.entity_brand_name}}</td>
										<td ng-show="!cols.contains('entity_group_name')" column="entity_group_name">{{c.entity_group_name}}</td>
										<td  ng-show="!cols.contains('vin')" class="">{{c.vin}}</td>
										<td  ng-show="!cols.contains('reservoirAge')" class="right">{{c.reservoirage|number:2}}</td>
										<td  ng-show="!cols.contains('plm_1')" class="right">{{c.plm_1|number:2}}</td>
										<td  ng-show="!cols.contains('plm_2')" class="right">{{c.plm_2|number:2}}</td>
										<td  ng-show="!cols.contains('plm_3')" class="right">{{c.plm_3|number:2}}</td>
										<td  ng-show="!cols.contains('plm_4')" class="right">{{c.plm_4|number:2}}</td>
										<td  ng-show="!cols.contains('storagename')" class="">{{c.storagename}}</td>
										<td  ng-show="!cols.contains('storagepositionname')" class="">{{c.storagepositionname}}</td>
										<td  ng-show="!cols.contains('purchaseprice')" class="right">{{c.purchaseprice|number:2}}</td>
										<td  ng-show="!cols.contains('seriesname')" class="">{{c.seriesname}}</td>
										<td  ng-show="!cols.contains('modelname')" class="">{{c.modelname}}</td>
										<td  ng-show="!cols.contains('configname')" class="">{{c.configname}}</td>
										<td  ng-show="!cols.contains('colorname')" class="">{{c.colorname}}</td>
										<td  ng-show="!cols.contains('productcode')" class="">{{c.productcode}}</td>
										<td  ng-show="!cols.contains('productname')" class="">{{c.productname}}</td>
										<td ng-show="!cols.contains('fake_flag')" class="">{{c.fake_flag=='12781001'?'是':(c.fake_flag=='12781002'?'否':'')}}</td>
										<td ng-show="!cols.contains('is_test_drive_car')" class="">{{c.is_test_drive_car=='12781001'?'是':(c.is_test_drive_car=='12781002'?'否':'')}}</td>
										<td ng-show="!cols.contains('source_code')" class="">{{c.source_code=='0001'?'自有现金':(c.source_code=='1001'?'现款':c.source_code=='1002'?"银行融资":"")}}</td>
										<td  ng-show="!cols.contains('stockstatus')" class="">{{c.stockstatus}}</td>
										<td  ng-show="!cols.contains('marstatus')" class="">{{c.marstatus}}</td>
										<td  ng-show="!cols.contains('firststockindate')" class="">{{c.firststockindate | date : 'yyyy-MM-dd'}}</td>
										<td  ng-show="!cols.contains('interestholiday')" class="right">{{c.interestholiday|number:2}}</td>
										<td  ng-show="!cols.contains('surplus')" class="right">{{c.surplus|number:2}}</td>
									</tr>

								</tbody>
							</table>
							<div class="no-items" ng-show="pagination.totalItems <= 0">暂无数据</div>

						</div>
						<tm-pagination conf="pagination"></tm-pagination>
					</div>
				</section>
				<!--表格显示区域-->

			</div>
		</div>
	</div>
	 
</div>

<form id="export_form" action="cotyReport/export"  method="post">
	<input type="hidden" name="keys" id="keys" />
	<input type="hidden" name="names" id="names" /> 
	<input type="hidden" name="params" id="params" />
	<input type="hidden" name="search_opt" id="search_opt" /> 
	<input type="hidden" name="file_name" id="file_name" value="库龄车龄统计"/>
</form>
